﻿package
{
	import flash.media.Sound;
	import evo.engine.Sequencer;
	import evo.engine.Tick;
	import evo.engine.TickPattern;

	public class DemoSynch extends Sequencer
	{
		public var bassDrum:Tick=new Tick();
		public var flash:Tick = new Tick();
		public var longflash:Tick = new Tick();
		
		public function DemoSynch() {
			setBPM(130);
			setOffset(-120);

			makeTriggers();
		}

		public function makeTriggers():void {
			var PHASE:TickPattern=new TickPattern(phase, 0);
			var PHASEDBL:TickPattern=new TickPattern(phase, 0,2);
			var PHASE2:TickPattern=new TickPattern(phase, 1);
			var PHASE4:TickPattern=new TickPattern(phase, 0,1,2,3);
				
			var BD:TickPattern=new TickPattern(bassDrum,0,1,2,3);
			var BD2:TickPattern=new TickPattern(bassDrum,0,2);
			var BD8:TickPattern=new TickPattern(bassDrum,0,0.5,1,1.5,2,2.5,3,3.5);
			
			var FLASH4:TickPattern=new TickPattern(flash, 0,1,2,3);
			var FLASH8:TickPattern=new TickPattern(flash, 0,0.5,1,1.5,2,2.5,3,3.5);
			var FLASH:TickPattern=new TickPattern(flash, 0);
			var LONGFLASH:TickPattern=new TickPattern(longflash, 0);
						addTickers(BD);
			
			addTickers(BD);
			addTickers(BD2);
			addTickers(BD);
			addTickers(BD2);
			addTickers(FLASH, BD);
			addTickers(BD2);
			addTickers(BD);
			addTickers(BD);
			addTickers(LONGFLASH);
		}
	}
}